package GUI;


import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Image;

import javax.imageio.ImageIO;
import javax.imageio.stream.ImageInputStream;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.border.EmptyBorder;
import java.awt.Panel;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.awt.Label;
import java.awt.Toolkit;
import javax.swing.JButton;
import javax.swing.JTextField;
import java.awt.SystemColor;
import java.awt.Color;
import java.awt.Font;
import javax.swing.JPasswordField;

public class LoginScreen extends JFrame {

	private JPanel contentPane;
	private JTextField textField_1;
	private JPasswordField passwordField;

	/**
	 * Launch the application.
	 */
/*	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					LoginScreen frame = new LoginScreen();
					frame.setVisible(true);
					
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}
*/
 public LoginScreen() 
 {
 	setTitle("ICM Login");
 	setIconImage(Toolkit.getDefaultToolkit().getImage(LoginScreen.class.getResource("/GUI/Image/12_hardware_dock.png")));
 	getContentPane().setLayout(null);
 	
 	this.setSize(500, 500);
 	
 	Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
 	
 	int w = this.getSize().width;
    int h = this.getSize().height;
    int x = (dim.width-w)/2;
    int y = (dim.height-h)/2;

    // Move the window
    this.setLocation(x, y);
 	
 	JPanel panel = new JPanel();
 	panel.setBackground(SystemColor.activeCaption);
 	panel.setBounds(86, 27, 274, 207);
 	getContentPane().add(panel);
 	panel.setLayout(null);
 	
 	JLabel lblUserName = new JLabel("User Name:");
 	lblUserName.setBounds(21, 72, 76, 14);
 	panel.add(lblUserName);
 	
 	JLabel lblPassword = new JLabel("Password:");
 	lblPassword.setBounds(21, 119, 76, 14);
 	panel.add(lblPassword);
 	
 	textField_1 = new JTextField();
 	textField_1.setBounds(97, 69, 121, 20);
 	panel.add(textField_1);
 	textField_1.setColumns(10);
 	
 	JLabel lblPasswordWrong = new JLabel("Password wrong");
 	lblPasswordWrong.setForeground(Color.RED);
 	lblPasswordWrong.setBounds(97, 97, 121, 14);
 	lblPasswordWrong.setVisible(false);
 	
 	panel.add(lblPasswordWrong);
 	
 	JLabel lblNewLabel = new JLabel("User Name wrong");
 	lblNewLabel.setForeground(Color.RED);
 	lblNewLabel.setBounds(97, 54, 121, 14);
 	lblNewLabel.setVisible(false);
 	panel.add(lblNewLabel);
 	
 	JButton btnLogin = new JButton("");
 	btnLogin.setIcon(new ImageIcon(LoginScreen.class.getResource("/GUI/Image/10_device_access_not_secure.png")));
 	btnLogin.setBounds(218, 155, 46, 41);
 	panel.add(btnLogin);
 	
 	JLabel lblLogin = new JLabel("Login");
 	lblLogin.setBounds(231, 137, 33, 14);
 	panel.add(lblLogin);
 	
 	JLabel lblLogin_1 = new JLabel("Login");
 	lblLogin_1.setFont(new Font("Tahoma", Font.BOLD, 23));
 	lblLogin_1.setBounds(101, 11, 92, 32);
 	panel.add(lblLogin_1);
 	
 	passwordField = new JPasswordField();
 	passwordField.setBounds(97, 116, 121, 20);
 	panel.add(passwordField);


 }
}
	       
